main(a,b,c,d,e,f)
{
	for(gets(&a);~scanf("%d%d%d",&a,&b,&c);)
	{
		d=a<b?a<c?a:c:b<c?b:c,f=a>b?a>c?a:c:b>c?b:c,e=d-a?f-a?a:d-b?b:c:f-b?b:c;
		if(f<d+e)
		{
			if(d*d+e*e==f*f)
				printf("%.2lf\n",1.*d*e/2.);
			else puts("-2");
		}
		else puts("-1");
	}
}
